<?php

namespace App\Models;



use App\Helpers\Api\MyCacheTrait;
use Illuminate\Database\Eloquent\SoftDeletes;


class Category extends Base
{
    use SoftDeletes, MyCacheTrait;

    const TYPE_COOKBOOK = 1;
    const TYPE_MALL = 2;

    public function child() {
        return $this->hasMany(Category::class, 'parent_id')->orderBy('sort', 'desc');
    }

}
